package io.gitee.zhangbinhub.admin.common

import io.gitee.zhangbinhub.admin.common.actuate.info.AcpAdminDependenciesInfoContributor
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration
import org.springframework.boot.actuate.autoconfigure.info.ConditionalOnEnabledInfoContributor
import org.springframework.boot.actuate.info.InfoContributor
import org.springframework.boot.autoconfigure.AutoConfiguration
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass
import org.springframework.context.annotation.Bean

@AutoConfiguration(before = [EndpointAutoConfiguration::class])
@ConditionalOnClass(InfoContributor::class, ConditionalOnEnabledInfoContributor::class)
class AcpAdminInfoAutoConfiguration {
    @Bean
    @ConditionalOnEnabledInfoContributor("acp-admin-cloud-dependencies")
    fun acpAdminDependenciesInfoContributor() = AcpAdminDependenciesInfoContributor()
}